﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CookComputing.XmlRpc;
using VH.SharePoint.Api.MetaWeblog;

namespace VH.SharePoint.Api.MetaWeblog
{
    public interface IMetaWebLog
    {
        [XmlRpcMethod("metaWeblog.newPost",Description = "Create a new post")]
        [return: XmlRpcReturnValue(Description = "Post identifier.")]
        String NewPost(String blogId, String userName, String password, Post content, Boolean publish);

        [XmlRpcMethod("metaWeblog.editPost", Description = "Edit a post")]
        [return: XmlRpcReturnValue(Description = "Returns true.")]
        Boolean EditPost(Object postId, String userName, String password, Post content, Boolean publish);

        [XmlRpcMethod("metaWeblog.getPost", Description = "Retrieve a post.")]
        Post GetPost(Object postId, String username, String password);

        [XmlRpcMethod("metaWeblog.getRecentPosts", Description = "Retrieve a list of recent posts.")]
        Post[] GetRecentPosts(String blogId, String username, String password, Int32 numberOfPosts);

        [XmlRpcMethod("metaWeblog.deletePost", Description = "Delete an existing post.")]
        [return: XmlRpcReturnValue(Description = "Returns true.")]
        Boolean DeletePost(Object postId, String username, String password);

        [XmlRpcMethod("metaWeblog.newMediaObject", Description = "Upload a media file.")]
        MediaObjectInfo NewMediaObject(String blogId, String username, String password, MediaObject mediaInfo);

        [XmlRpcMethod("metaWeblog.getCategories", Description = "Retrieve list of categories. ")]
        Category[] GetCategories(String blogId, String username, String password);
    }
}
